﻿using System;  
using System.ComponentModel.DataAnnotations;
using System.Collections.Generic;

namespace si.caha.Model
{
    public class User
    {
        [Key]
        public int UserId { get; set; }

        [Required]
        [RegularExpression(".+\\@.+\\..+", ErrorMessage="Email address is not valid!")]
        public string Email { get; set; }

        public virtual ICollection<Address> Addresses { get; set; }
        
        public virtual ICollection<Order> Orders { get; set; }

        public virtual ICollection<Review> Reviews { get; set; }
    }
}